import { findHeadCategory } from '@/api/home'
const state = () => ({
	list: []
})

const mutations = {
	setList (state, payload) {
		state.list = payload
	}
}

const actions = {
	async getListAction ({ commit }) {
		const res = await findHeadCategory()
		commit('setList', res)
	}
}

export default {
	namespaced: true,
	state,
	mutations,
	actions
}